/**
 * Created by dale on 2017/10/23.
 */

/**
 * 扫码回调
 * @type {{setResult: JSObjectHandle.setResult}}
 * created by dale 2017/9/15
 */
var target = null;
var JSObjectHandle={
    setResult:function (code) {
        setTimeout(function () {
            target.textbox('setValue',code);
        },0);
    }
};

$('#save').click(function () {

    $.ajax({
        url:baseUrl+'ims/moblie/saveDev',
        data:$('#ff').serialize(),
        type:'post',
        success:function (data) {
            window.top.sendSuccessMsg(data);
        },
        error:function (data) {
            window.top.sendSuccessMsg(data['responseText']);
        }
    });
});
$('#ff').on('click',('.textbox-button'),function () {  //textBox按钮点击事件
    target =$(this).parent().prev();
    // window.webkit.messageHandlers.openScanf.postMessage(null);
    window.top.openScan();
});